﻿using System;

namespace Sonce.Common
{
    public interface ICommand
    {
        string Name { get; set; }
        string Value { get; set; }
    }

    public partial class Command : ICommand
    {
        #region ICommand Members
        /// <summary>
        /// Gets or sets a command name.
        /// </summary>
        public string Name
        {
            get;
            set;
        }

        /// <summary>
        /// Gets or sets a command value.
        /// </summary>
        public string Value
        {
            get;
            set;
        }
        #endregion

        #region Constructors
        /// <summary>
        /// Initializes a new Command instance.
        /// </summary>
        public Command()
        {
        }

        /// <summary>
        /// Initializes a new Command instance.
        /// </summary>
        /// <param name="name">Command name.</param>
        /// <param name="value">Command value.</param>
        public Command(string name, string value)
        {
            this.Name = name;
            this.Value = value;
        }
        #endregion
    }

    [Obsolete("No longer in use, replaced with ElementTag.")]
    public partial class ElementCommand : ICommand
    {
        #region ICommand Members
        public int ID
        {
            get;
            set;
        }

        public string Name
        {
            get;
            set;
        }

        public string Value
        {
            get;
            set;
        }

        public string Source
        {
            get;
            set;
        }
        #endregion

        #region Constructor
        public ElementCommand()
        {
        }

        public ElementCommand(string name, string value)
        {
            this.Name = name;
            this.Value = value;
        }
        #endregion
    }
}
